package com.leyou.common.exceptions;

import com.leyou.common.enums.ExceptionEnum;
import lombok.Getter;

/**
 * @author hcz
 * @describtion TODO
 * @date 2019-06-22 22:08
 */
@Getter
public class LyException extends RuntimeException {
    private int status;

    public LyException(int status,String message, Throwable cause) {
        super(message, cause);
        this.status = status;
    }

    public LyException(int status,String message) {
        super(message);
        this.status = status;
    }

    public LyException(ExceptionEnum anEnum) {
        super(anEnum.getMessage());
        this.status=anEnum.getStatus();
    }

    public LyException(ExceptionEnum anEnum,Throwable cause) {
        super(anEnum.getMessage(),cause);
        this.status=anEnum.getStatus();
    }
}
